/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.lottery.entity;


import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.wealth.member.entity.Member;

@Entity
@Table(name = "lottery_number")
public class LotteryNumber implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private Integer total;
	
	private Member member;
	private LotteryActivity activity;
	
	
	/* ---------------- method ----------------*/
	
	public LotteryNumber(){
	}

	public LotteryNumber(Long id){
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "total")
	public Integer getTotal() {
		return total;
	}
	
	public void setTotal(Integer total) {
		this.total = total;
	}
	
	@ManyToOne
	@JoinColumn(name = "member_id")
	public Member getMember() {
		return member;
	}
	
	public void setMember(Member member){
		this.member = member;
	}
	@ManyToOne
	@JoinColumn(name = "lottery_id")
	public LotteryActivity getActivity() {
		return activity;
	}
	
	public void setActivity(LotteryActivity activity){
		this.activity = activity;
	}
	
}



